package org.hackystat.ui.orb.client.common;

import com.google.gwt.user.client.rpc.AsyncCallback;

/**
 * Remote procedure call interface for communicating with the Twitter server. 
 * 
 * @author David J. Nickles
 */
public interface RPCRemoteServiceAsync {
  
  /**
   * This method sets a specific color and animation on the Orb.
   * 
   * @param orb the state of the Ambient Orb.
   * @param callback the re-entry method
   */
  public void putOrb(AmbientOrb orb, AsyncCallback callback);
  
  /**
   * This method retrieves the host uris for the Sensorbase and DailyProjectData services from the
   * Project Viewer properties file.
   * 
   * @param callback the re-entry method
   */
  public void getHosts(AsyncCallback callback);

  /**
   * Returns true if the passed host is a DailyProjectData Analysis service host.
   * 
   * @param host the URI for the DailyProjectData host.
   * @param callback the re-entry method.
   */
  public void isDailyProjectDataHost(String host, AsyncCallback callback);

  /**
   * Returns true if the passed host is a SensorBase service host.
   * 
   * @param host the URI for the SensorBase
   * @param callback the re-entry method
   */
  public void isSensorBaseHost(String host, AsyncCallback callback);

  /**
   * Returns true if the user and password is registered as a user with this host.
   * 
   * @param host the URI for the SensorBase
   * @param user user to authentication
   * @param password key for authentication
   * @param callback the re-entry method
   */
  public void isRegistered(String host, String user, String password, AsyncCallback callback);

  /**
   * Registers the user with this host.
   * 
   * @param host the URI for the SensorBase
   * @param user user to authentication
   * @param callback the re-entry method
   */
  public void registerUser(String host, String user, AsyncCallback callback);
  
  /**
   * Returns the attributes set in the Manifest file.
   * 
   * @param callback address of return function.
   */
  public void getManifest(AsyncCallback callback); 
  
  /**
   * Return a formatted description of the requested data overview for the specified interval.
   * @param uri the URI for the SensorBase.
   * @param project the project of interest.
   * @param user username (email address) for authentication.
   * @param password user password for authentication.
   * @param year of interval.
   * @param month of interval.
   * @param callback address of return function.
   */
  public void getOverview(String uri, String project, 
    String user, String password, int year, int month, AsyncCallback callback);
    
  /**
   * Logs the message from the javascript client.
   * 
   * @param text message to log.
   * @param callback address of return function.
   */
  public void logClient(String text, AsyncCallback callback);
}
